package com.qf.service.Impl;

import com.qf.mapper.WorkorderMapper;
import com.qf.pojo.WorkerOrder;
import com.qf.service.WorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class WorkOrderServiceImpl implements WorkOrderService {

    @Autowired
    WorkorderMapper workorderMapper;

    @Override
    public Integer save(WorkerOrder workerOrder) {

        workerOrder.setCreateDate(new Date());
        return workorderMapper.save(workerOrder);
    }

    @Override
    public List<WorkerOrder> findWorkorderAndProjectName() {
        return workorderMapper.findWorkorderAndProjectName();
    }
}
